﻿//#define PROCESS_ASSEMBLIES

#if PROCESS_ASSEMBLIES
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace VersionComparer.DataModel.Assemblies
{
    public class AssemblyItemCreator : ComparableItemCreator
    {
        protected override ComparableItem CreateFromValue(ItemId itemId)
        {
            try
            {

                string extension = Path.GetExtension(itemId.Name);
                if (string.Compare(extension, ".dll", true) != 0 && string.Compare(extension, ".exe", true) != 0)
                    return null;
                return new AssemblyItem(itemId.Name, itemId.Id);
            }
            catch
            {
                return null;
            }
        }

        public override int Order
        {
            get
            {
                return 50;
            }
        }
    }
}

#endif